package com.fmy.jurisdiction.modular.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 角色表
 * </p>
 *
 * @author Mr.fmy
 * @since 2019-09-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class AdminRole implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 角色名称
     */
    @NotBlank(message = "请输入角色名称")
    private String roleName;

    /**
     * 角色编码
     */
    @NotBlank(message = "请输入角色Code")
    private String code;

    /**
     * 角色父编码
     */
    @NotBlank(message = "请选择父级角色")
    private String fCode;

    /**
     * 父编码集合 父编码集合、以,分割
     */
    private String fCodes;

    /**
     * 层级 默认0
     */
    private Integer level;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 创建人
     */
    private Integer createUser;

    /**
     * 修改时间
     */
    private Date modifyTime;

    /**
     * 修改人
     */
    private Integer modifyUser;


    public static final String ID = "id";

    public static final String ROLE_NAME = "role_name";

    public static final String CODE = "code";

    public static final String F_CODE = "f_code";

    public static final String F_CODES = "f_codes";

    public static final String LEVEL = "level";

    public static final String CREATE_TIME = "create_time";

    public static final String CREATE_USER = "create_user";

    public static final String MODIFY_TIME  = "modify_time";

    public static final String MODIFY_USER = "modify_user";

    public static final String ID_FIELD = "id";

    public static final String ROLENAME_FIELD = "roleName";

    public static final String CODE_FIELD = "code";

    public static final String FCODE_FIELD = "fCode";

    public static final String FCODES_FIELD = "fCodes";

    public static final String CREATE_TIME_FIELD = "createTime";

    public static final String CREATE_USER_FIELD = "createUser";

    public static final String MODIFY_TIME_FIELD   = "modifyTime";

    public static final String MODIFY_USER_FIELD  = "modifyUser";

    public static final String LEVEL_FIELD = "level";

}
